#include <crt_util.h>
#include "test.h"

// #pragma comment(lib, "kernel32.lib")
// #pragma comment(lib, "shell32.lib")
// #pragma comment(linker, "/ENTRY:main")

int main(int argc, char* argv[])
{
    init_sockenv(2, 2);
    int rc = 0;

    logi("test_main");

    test_array();

    test_init_evaddr();

    _thread_t thread1;
    rc = _thread_create(&thread1, thread_proc1, NULL);
    rc_error(rc == S_SUCCESS, S_ERROR);

    _thread_t thread2;
    rc = _thread_create(&thread2, thread_proc2, NULL);
    rc_error(rc == S_SUCCESS, S_ERROR);

    _thread_t thread3;
    rc = _thread_create(&thread3, thread_proc3, NULL);
    rc_error(rc == S_SUCCESS, S_ERROR);

    _thread_t thread4;
    rc = _thread_create(&thread4, thread_proc4, NULL);
    rc_error(rc == S_SUCCESS, S_ERROR);

    test_oper_run();

    uninit_sockenv(2, 2);
    return 0;
}
